package com.zxw.consumer;

import lombok.AllArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author by zhuxiansheng
 * @description 消费者实现类
 * @date 2020/7/10 11:22
 */
@AllArgsConstructor
public class MyComsumer extends AbsDisruptorConsumer<String> {
    private String name;
    @Override
    public void comsume(String event) {
        System.out.println(LocalDateTime.now().toString() + name + " 从队列中取到数据 " + event);
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
